<?php
/**
 * PM5 PHP Framework
 * Originally developed by Patrick McGovern
 * 
 * This content handler class generates the standard 'home' page.
 * This is the default page that is loaded when no view or action
 * handlers are specified.
 *
 */
class Handler
{
	/**
	 * This is a reference to the Main object that runs the application.
	 * This gives us access to all of it's public values and functionality
	 *
	 * @var object
	 */
	private $main;
	
	/**
	 * HTML Page Title referenced by the output handler
	 *
	 * @var string
	 */
	public $pageTitle;

	/**
	 * HTML Meta Keywords referenced by the output handler
	 *
	 * @var string
	 */
	public $metaKeywords;
	
	/**
	 * HTML Meta Description referenced by the output handler
	 *
	 * @var string
	 */
	public $metaDescription;
	
	/**
	 * HTML of this page used to generate the final output to the 
	 * browser.
	 *
	 * @var string
	 */
	public $HTML;
	
	/**
	 * Main construct of the class
	 * This includes all instructions to be run at instantiation
	 *
	 * @param object $main
	 * @return boolean
	 */
	public function __construct($main)
	{
		$this->main = $main;
		
		/**
		 * Set all values referenced by the output handler
		 */
		$this->_setPublicValues();
		
		return true;
	}
	
	/**
	 * Set all values referenced by the output handler
	 * Values not defined or left empty will be replaced by the application
	 * default values set in config/core.config.php
	 *
	 * @return boolean
	 */
	private function _setPublicValues()
	{
		$this->pageTitle = '';
		$this->metaKeywords = '';
		$this->metaDescription = '';
		
		return true;
	}
	
	private function _generatePageHTML()
	{
		$html = 'Thanks for using the PM5 PHP Framework!';
		
		$this->HTML = $html;
		unset($html);
		
		return true;
	}
}